<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="XPathContext,memorphic.xpath.model.XPathContext,contextNode,contextPosition,contextSize,defaultFunctions,defaultNamespaces,functions,namespaces,openAllNamespaces,variables,zeroIndexPosition,callFunction,copy,getFunction,getNamespace,getVariable,last,node,position" name="keywords">
<title>memorphic.xpath.model.XPathContext</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'XPathContext - xpath-as3';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?memorphic/xpath/model/XPathContext.html&amp;memorphic/xpath/model/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;XPathContext</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class XPathContext"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">memorphic.xpath.model</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class XPathContext</td>
</tr>
</table>
<p></p>
<p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#contextNode">contextNode</a> : XML<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#contextPosition">contextPosition</a> : int<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#contextSize">contextSize</a> : int<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#defaultFunctions">defaultFunctions</a> : Object<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#defaultNamespaces">defaultNamespaces</a> : Object<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#functions">functions</a> : Object<div class="summaryTableDescription">
   Any function references that you add to this object will be accessible in your XPath statements, using the name that you assign it to.</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#namespaces">namespaces</a> : Object<div class="summaryTableDescription">
   
    </div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#openAllNamespaces">openAllNamespaces</a> : Boolean = false<div class="summaryTableDescription">
   
   </div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#variables">variables</a> : Object<div class="summaryTableDescription">
   A table of variable references to use inside XPath statements.</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#zeroIndexPosition">zeroIndexPosition</a> : Boolean = false<div class="summaryTableDescription">
   Setting this property to true will cause element position to be computed starting from
   0, instead of 1.</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#XPathContext()">XPathContext</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#callFunction()">callFunction</a>(name:Object, args:Array = null):Object</div>
<div class="summaryTableDescription">
   
   </div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#copy()">copy</a>(deepCopy:Boolean = true):<a href="../model/XPathContext.html">XPathContext</a>
</div>
<div class="summaryTableDescription">
   Creates a copy of an XPathContext object
   </div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getFunction()">getFunction</a>(name:*):Function</div>
<div class="summaryTableDescription">
   
   </div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getNamespace()">getNamespace</a>(prefix:String):String</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getVariable()">getVariable</a>(name:*):Object</div>
<div class="summaryTableDescription">
   
   </div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#last()">last</a>():int</div>
<div class="summaryTableDescription">
   Inside a predicate, last() represents the size of the current node set and the maximum value of <code>position()>/code>.</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#node()">node</a>():XML</div>
<div class="summaryTableDescription">
   Inside a predicate, node() represents the current node, on which the predicate is acting.</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#position()">position</a>():int</div>
<div class="summaryTableDescription">
   Inside a predicate, position() represents the index of the current context node, within the node set.</div>
</td><td class="summaryTableOwnerCol">XPathContext</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="contextNode"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">contextNode</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var contextNode:XML</code>
</div>
<a name="contextPosition"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">contextPosition</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var contextPosition:int</code>
</div>
<a name="contextSize"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">contextSize</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var contextSize:int</code>
</div>
<a name="defaultFunctions"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">defaultFunctions</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static var defaultFunctions:Object</code>
</div>
<a name="defaultNamespaces"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">defaultNamespaces</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static var defaultNamespaces:Object</code>
</div>
<a name="functions"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">functions</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var functions:Object</code><p>
   Any function references that you add to this object will be accessible in your XPath statements, using the name that you assign it to.
   The first argument must be of type XPathContext. Remaining arguments must match those passed to the function inside the statement.
   
   For example:
   
   <code>
    function formatNumber(context:XPathContext, arg1:Number):String
    {
     return new NumberFormat("####.##").format(arg1);
    }
   
    .....
   
    myXPathQuery.context.functions["format-number"] = formatNumber;
   
   </code>
    </p></div>
<a name="namespaces"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">namespaces</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var namespaces:Object</code><p>
   
    </p></div>
<a name="openAllNamespaces"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">openAllNamespaces</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var openAllNamespaces:Boolean = false</code><p>
   
   </p></div>
<a name="variables"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">variables</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var variables:Object</code><p>
   A table of variable references to use inside XPath statements.
   
   For example:
   
   var xpath:XPathQuery = new XPathQuery("foo/bar[</p></div>
<a name="zeroIndexPosition"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">zeroIndexPosition</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var zeroIndexPosition:Boolean = false</code><p>
   Setting this property to true will cause element position to be computed starting from
   0, instead of 1. The official XPath specification requires that position start from 1,
   but Internet Explorer 5.0 (and possibly other implementations) are 0 indexed.
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="XPathContext()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">XPathContext</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function XPathContext()</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="callFunction()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">callFunction</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public final function callFunction(name:Object, args:Array = null):Object</code><p>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:Object</code> &mdash; Can be a String or QName
   
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">args</span>:Array</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
</div>
<a name="copy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">copy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function copy(deepCopy:Boolean = true):<a href="../model/XPathContext.html">XPathContext</a></code><p>
   Creates a copy of an XPathContext object
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">deepCopy</span>:Boolean</code> (default = <code>true</code>)<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../model/XPathContext.html">XPathContext</a></code></td>
</tr>
</table>
</div>
<a name="getFunction()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getFunction</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public final function getFunction(name:*):Function</code><p>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:*</code> &mdash; Can be a String or QName
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Function</code></td>
</tr>
</table>
</div>
<a name="getNamespace()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getNamespace</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public final function getNamespace(prefix:String):String</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">prefix</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code></td>
</tr>
</table>
</div>
<a name="getVariable()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getVariable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public final function getVariable(name:*):Object</code><p>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:*</code> &mdash; Can be a String or QName
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash; if the variable is not found
   </td>
</tr>
</table>
</div>
<a name="last()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">last</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public final function last():int</code><p>
   Inside a predicate, last() represents the size of the current node set and the maximum value of <code>position()>/code>.
   This method is provided for use within custom functions.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code></td>
</tr>
</table>
</div>
<a name="node()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">node</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public final function node():XML</code><p>
   Inside a predicate, node() represents the current node, on which the predicate is acting.
   This method is provided for use within custom functions.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>XML</code></td>
</tr>
</table>
</div>
<a name="position()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">position</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public final function position():int</code><p>
   Inside a predicate, position() represents the index of the current context node, within the node set.
   According to the w3c spec, position() is 1-indexed, so the first node will have index 1. 
   
   Some XPath implementations (notably Microsoft's) are zero indexed. You can change to this behaviour 
   using the <code>zeroIndexPosition</code> property.
   
   
   This method is provided for use within custom functions.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
